# Dynamic listener configuration for Envoy.
resources:
- "@type": type.googleapis.com/envoy.config.listener.v3.Listener
  name: listener_0
  address:
    socket_address:
      address: $proxy_ip
      port_value: 0
  filter_chains:
  - filters:
    - name: envoy.http_connection_manager
      typed_config:
        "@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
        codec_type: AUTO
        stat_prefix: ingress_http
        http_filters:
        - name: envoy.router
          typed_config:
            "@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
        route_config:
          name: local_route
          virtual_hosts:
          - name: cluster_one_service
            domains:
            - "cluster_one.com"
            routes:
            - match:
                prefix: "/"
              route:
                cluster: cluster_one
          - name: cluster_two_service
            domains:
            - "cluster_two.com"
            routes:
            - match:
                prefix: "/"
              route:
                cluster: cluster_two
          - name: cluster_three_service
            domains:
            - "cluster_three.com"
            routes:
            - match:
                prefix: "/"
              route:
                cluster: cluster_three
          - name: cluster_four_service
            domains:
            - "cluster_four.com"
            routes:
            - match:
                prefix: "/"
              route:
                cluster: cluster_four
          - name: cluster_five_service
            domains:
            - "cluster_five.com"
            routes:
            - match:
                prefix: "/"
              route:
                cluster: cluster_five
          - name: fallback_service
            domains:
            - "*"
            routes:
            - match:
                prefix: "/"
              route:
                host_rewrite_literal: www.envoyproxy.io
                cluster: service_envoyproxy_io
          validate_clusters: false
